<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<%-- <link rel="stylesheet" href="${host_url}/css/app/common.css">
<link rel="stylesheet"  href="${host_url}/css/app/my-growth.css"> --%>
<link rel="stylesheet" href="/css/app/common.css"> 
<link rel="stylesheet"  href="/css/app/my-growth.css">
<link rel="stylesheet"  href="/css/app/dropload.css">
<script src="/js/app/jquery.min.js"></script>
<script src="/js/app/dropload.min.js"></script>

<title>会员升级</title>
<script type="text/javascript">	
$(function(){
	/*  页数 */
	var page_index_all = 2; 
	<c:if test="${list.size()!=0}">
    	loadPagination("listAll",page_index_all,"logAll","","");
    </c:if> 
});	
function loadPagination(div_id, page_index, ul_id, bill_type, type){
	$('#'+div_id).dropload({
        scrollArea : window,
        loadDownFn : function(me){
            $.ajax({
                type: 'get',
                url: 'myGrowthValueItem?page_index='+page_index+"&bill_type="+bill_type+"&type="+type,
                dataType: 'text',
                beforeSend: function(request) {
    				request.setRequestHeader("AUTHORIZATION","${token}");
    				request.setRequestHeader("SECRET","${memberId}");
    				request.setRequestHeader("OS","${os}");
    			 }, 
                contentType:"application/x-www-form-urlencoded; charset=UTF-8",
                success: function(msg){
                    if($.trim(msg)){
                		page_index++;
                    	$("#"+ul_id).append(msg);
                    	me.resetload();
                    	/* 如果没有数据 */
                    } else{
                        /* 锁定 */
                        me.lock();
                        /* 无数据 */
                        me.noData();
                        $("#"+div_id+" .dropload-load").html("已经到底了~");
                    } 
                },
	                error: function(xhr, type){
                    /* 即使加载出错，也得重置 */
                    me.resetload();
                } 
            });
        }
    });
}
</script>
</head>	
<body>	
	<div class="main">
		<h4>我目前的成长值为：<span style="font-size:20px;color:#f34545;">${cur_ticket}</span></h4>
		<div id="listAll">
	    	<ul id="logAll">
	    	<c:forEach items="${list}" var="c">
				<div class="list">
				<c:if test="${c.type == 1}">
					<p>充值${ticket_name }</p>
				</c:if>
				<fmt:parseDate value=" ${c.create_time}" var="date" pattern="yyyy-MM-dd HH:mm:ss"/>  
					<p><fmt:formatDate value="${date}" pattern="yyyy-MM-dd HH:mm" /></p>
					<p>+${c.num}</p>
				</div>
			</c:forEach>
			</ul>
			<c:if test="${list.size()==0}">
			<div class="zanwu">
				  <span><img src="${host_url}/img/app/zanwu.png"></span>
				  <p>暂无记录</p>
			</div>
			</c:if>
		</div>
	</div>
</body>
</html>